
#include "stdafx.h"
#include "Lock.h"

CLock::CLock()
{
	m_hMutex = CreateMutex(NULL, FALSE, NULL);
}

CLock::~CLock()
{
	ReleaseMutex(m_hMutex);
}
void CLock::Lock()
{
	WaitForSingleObject(m_hMutex, INFINITE);
}
void CLock::UnLock()
{
	ReleaseMutex(m_hMutex);
}